package com.example.yls.demoa;

import android.os.Binder;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MyBinder extends Binder{
       public int add(int a,int b){
            return  a+b;
        }
        /*public String toUpperCase(String str){
            return  str.toUpperCase();
        }*/

        
        //获得时间
        public String getTimeStr() {
            Date date = new Date();
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
            return format.format(date);
        }
    //获得逆序字符
    public static String reverseStr(String str) {
         String[] words = str.split(" ");
          StringBuffer resultBuffer = new StringBuffer();
          for (String word : words){
              StringBuffer wordBuffer = new StringBuffer(word);
              resultBuffer.append(wordBuffer.reverse()).append(" ");
          }
          return resultBuffer.toString();
    }


}
